package cn.ycbjie.ycaudioplayer.newpack.linkagescroll.iapiserver;

import cn.ycbjie.ycaudioplayer.mybean.mycontent;
import cn.ycbjie.ycaudioplayer.mybean.myhomemaibean;
import cn.ycbjie.ycaudioplayer.newpack.linkagescroll.mybeans.MyhomeIconBean;
import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by yuyu on 2018-11-08.
 */

public interface iapi {


    /*
    获取播放mp3URL
    https://sapis.hkrstore.com/api/v1/subresources/jnes8gb7lubo/media
    https://sapis.hkrstore.com/api/v1/subresources/jnes8gb7lubo/media
     */
    @GET("/api/v1/subresources/{id}/media")
    Observable<String> getmp3(@Header("token") String token,@Path("id") String id);

    /*
    获取播放列表
     */
    @GET("/api/v1/resources/{id}/subresources")//?$limit=5&%24page=1
    Observable<String> getListmp3(@Path("id") String id, @Query("$limit") String limit, @Query("$page") String page);
    /*
    获取详情
     */
    @GET("/api/v1/resources/{Id}")
    Observable<mycontent> getContent(@Path("Id") String Id);


/*
搜索
 */
    @GET("/api/v1/resources?")
    Observable<String> search(@Query("$search") String search, @Query("type") int type, @Query("$limit") int limit);



    /*
    获取发现列表
     */
//    https://sapis.hkrstore.com/api/v1/resources?type=1&%24page=1&orderBy=
    @GET("/api/v1/resources?")
    Observable<String> getfinderlist(@Query("type") String type, @Query("$page") String page, @Query("orderBy") String orderBy);


    /*
    获取首页数据
     */
//    https://sapis.hkrstore.com/api/v1/resources?type=1&%24page=1&orderBy=
    @GET("/api/v1/home/topics")
    Observable<myhomemaibean> gethome();

/*
获取首页iconhttps://sapis.hkrstore.com/api/v1/tags/recommended
 */
@GET("/api/v1/tags/recommended")
Observable<MyhomeIconBean> gethomeicon();

/*
获取token
 */
@GET("/tesp_page/index.html")
Observable<String> gettoken();
}

